# Maintainer: Eric Bélanger <eric@archlinux.org>

pkgname=putty
pkgver=0.76
pkgrel=1
pkgdesc='A terminal integrated SSH/Telnet client'
arch=('x86_64')
url='https://www.chiark.greenend.org.uk/~sgtatham/putty/'
license=('MIT')
depends=('gtk3')
validpgpkeys=('E27394ACA3F9D9049522E0546289A25F4AE8DA82') # PuTTY Releases <putty@projects.tartarus.org>
source=("https://the.earth.li/~sgtatham/putty/${pkgver}/${pkgname}-${pkgver}.tar.gz"
        "putty-${pkgver}.tar.gz.sig::https://the.earth.li/~sgtatham/putty/${pkgver}/putty-${pkgver}.tar.gz.gpg"
        'putty.desktop'
        'putty.png'
        'putty.xpm')
sha256sums=('547cd97a8daa87ef71037fab0773bceb54a8abccb2f825a49ef8eba5e045713f'
            'SKIP'
            '4a8af81fe8ac702ad298606076088f237b83beed82cc089a32f314888b67cf2c'
            '621abf249dc6c6326faf259565546df84635b3afbe31893145a5056d8b114396'
            'd65139883171ed0119d9778ff4a89e6a8151a5ae97fcf8dc7cafb59df424377f')

build() {
  cd ${pkgname}-${pkgver}/unix

  ./configure \
    --prefix=/usr
  make
}

package() {
  cd ${pkgname}-${pkgver}/unix

  make DESTDIR="${pkgdir}" install

  install -D -m644 ../LICENCE "${pkgdir}"/usr/share/licenses/${pkgname}/LICENSE
  install -D -m0644 "${srcdir}"/putty.desktop "${pkgdir}"/usr/share/applications/putty.desktop
  install -D -m0644 "${srcdir}"/putty.png "${pkgdir}"/usr/share/pixmaps/putty.png
  install -D -m0644 "${srcdir}"/putty.xpm "${pkgdir}"/usr/share/pixmaps/putty.xpm
}
